/*
 * Copyright (c) 2025 EasyAdmin
 * All rights reserved.
 *
 * This file is part of the [EasAdmin] project.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Proprietary and confidential.
 *
 * Author: EasyAdmin ( 1073602@qq.com )
 * Website: https://www.xhxiao.com
 */
package com.easy.module.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easy.framework.common.validate.Add;
import com.easy.framework.common.validate.Update;
import com.easy.framework.database.entity.SimpleEntity;
import com.easy.framework.poi.annotation.Excel;
import com.easy.framework.poi.annotation.Option;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

/**
 * 字典数据表 实体
 *
 * @author EasyAdmin ( 1073602@qq.com )
 * @date 2025-08-19
 */
@Getter
@Setter
@TableName(value = "sys_dict_data")
public class SysDictData extends SimpleEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 字典编号
     */
    @Excel(name = "字典编号")
    @NotNull(message = "数据不存在",groups = { Update.class})
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 字典代码
     */
    @Excel(name = "字典代码")
    @NotBlank(message = "字典代码不能为空",groups = {Add.class, Update.class})
    @Size(min = 0, max = 32, message = "字典代码长度不能超过32个字符",groups = {Add.class, Update.class})
    private String dictCode;

    /**
     * 字典键值
     */
    @Excel(name = "字典键值")
    @NotBlank(message = "字典键值不能为空",groups = {Add.class, Update.class})
    @Size(min = 0, max = 32, message = "字典键值长度不能超过32个字符",groups = {Add.class, Update.class})
    private String dictValue;

    /**
     * 字典标签
     */
    @Excel(name = "字典标签")
    @NotBlank(message = "字典标签不能为空",groups = {Add.class, Update.class})
    @Size(min = 0, max = 50, message = "字典标签长度不能超过50个字符",groups = {Add.class, Update.class})
    private String dictLabel;

    /**
     * 默认（0否 1是）
     */
    @Excel(
            name = "默认",
            options = {
                    @Option(value = "0", name = "否"),
                    @Option(value = "1", name = "是")
            }
    )
    private String dictDefault;

    /**
     * 状态（0正常 1停用）
     */
    @Excel(
            name = "状态",
            options = {
                    @Option(value = "0", name = "正常"),
                    @Option(value = "1", name = "停用")
            }
    )
    private Integer status;

    /**
     * 顺序
     */
    @Excel(name = "顺序")
    private Integer sort;

    /**
     * 标签风格
     */
    @Excel(name = "标签风格")
    @Size(min = 0, max = 32, message = "标签风格长度不能超过32个字符",groups = {Add.class, Update.class})
    private String tagType;

    /**
     * 标签样式
     */
    @Excel(name = "标签样式")
    @Size(min = 0, max = 128, message = "标签样式长度不能超过128个字符",groups = {Add.class, Update.class})
    private String tagClass;

    /**
     * 图标
     */
    @Excel(name = "图标")
    @Size(min = 0, max = 50, message = "图标长度不能超过50个字符",groups = {Add.class, Update.class})
    private String icon;

    /**
     * 提示信息
     */
    @Excel(name = "提示信息")
    @Size(min = 0, max = 200, message = "提示信息长度不能超过200个字符",groups = {Add.class, Update.class})
    private String tip;
}
